import type {
  AxiosRequestConfig,
  AxiosRequestHeaders,
  AxiosResponse,
  AxiosError,
} from "axios"

export interface IXTinterceptors {
  requestSuccess: (
    config: AxiosRequestConfig<AxiosRequestHeaders>,
  ) => AxiosRequestConfig<AxiosRequestHeaders>
  requestFail?: (err: AxiosError) => AxiosError
  responseSuccess: (config: AxiosResponse) => AxiosResponse
  responseFail?: (err: AxiosError) => AxiosError
}

export interface IXTAxiosconfig extends AxiosRequestConfig {
  interceptors: IXTinterceptors
}
